package xyz.labmem.main.modular.common.pojo

import io.swagger.annotations.ApiModelProperty
import xyz.labmem.base.core.base.BaseVerify

import javax.validation.Valid
import javax.validation.constraints.NotBlank

class FormMap {
        @Valid
        @ApiModelProperty(value = "表单查询集合", required = false)
        var query: List<QueryMap>? = null
}
class QueryMapDots {

    @ApiModelProperty(value = "查询字段")
    @NotBlank(message = "查询字段不能为空", groups = [BaseVerify.page::class])
    var field: String? = null

    @ApiModelProperty(value = "字段值")
    var value: String? = null

    @ApiModelProperty(value = "查询类型(默认模糊查询)", example = "LIKE")
    var type: QueryType = QueryType.LIKE

}

enum class QueryMapsDots {
    LIKE,
    EQ, //=
    LT, //<
    GT, //>
}